package org.stvd.service.oauth;

import java.util.Map;

import org.stvd.common.utils.ServiceResult;
import org.stvd.core.dto.QueryResult;
import org.stvd.entities.oauth.OauthAccessToken;
import org.stvd.service.base.BaseService;

/**
 * 授权Token Service接口类
 * @author houzx
 */
public interface OauthAccessTokenService extends BaseService<OauthAccessToken>{

    /**
     * token查询
     * @param start
     * @param limit
     * @param user_name
     * @param client_id
     * @param grant_type
     * @return
     */
    QueryResult<Map<String, Object>> queryAccessTokenResult(int start, int limit, String user_name, String client_id, String grant_type);

    /**
     * 删除授权信息
     * @param tokenId tokenID
     * @return
     */
    ServiceResult<Map<String, Object>> deleteAccessToken(String tokenId);

    /**
     * 删除用户Token
     * @param userName 用户ID
     */
    void deleteUserTokenByUserName(String userName);

}
